﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using PlugNT.Common;
using PlugNT.Cms.Core;

namespace PlugNT.Cms.Web
{
    public partial class _Article : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                ////序列化
                //JsonArray jsonArray = new JsonArray();
                //jsonArray.Add("2007");
                //jsonArray.Add("2008");
                //jsonArray.Add("2009");
                //jsonArray.Add("2010");
                //JsonObject jsonObject = new JsonObject();
                //jsonObject.Add("domain", "mzwu.com");
                //jsonObject.Add("years", jsonArray);
                //Response.Write(JsonSimpleConvert.SerializeObject(jsonObject) + "\r\n");
                ////反序列化
                //JsonObject json = JsonSimpleConvert.DeserializeObject("{\"domain\":\"mzwu.com\",\"years\":[2007,2008,2009,2010]}");
                //if (json != null)
                //{
                //    Response.Write(json["domain"] + "\r\n");
                //    Response.Write(((JsonArray)json["years"])[3] + "\r\n");
                //}
                //Response.End();


                if (Request.QueryString["id"] == null || Request.QueryString["id"].Trim() == "")
                {
                    JScript.AlertAndRedirect("您查看的内容不存在！", "/");
                    Response.End();
                }
            }
        }

    }
}
